import loadable from '@/router/route-config';

export const routes = [
  {
    path: '/official-doc/create',
    auth: true,
    exact: true,
    component: loadable(() => import('@/pages/official-doc/create/index'))
  },
  {
    path: '/official-doc/edit/:id',
    auth: true,
    exact: true,
    component: loadable(() => import('@/pages/official-doc/create/index'))
  },
  {
    path: '/official-doc/detail/:id',
    auth: true,
    exact: true,
    component: loadable(() => import('@/pages/official-doc/detail/index'))
  },
  {
    path: '/official-doc/matter-detail/:id',
    auth: true,
    exact: true,
    component: loadable(() => import('@/pages/official-doc/matter-detail/index'))
  },
  {
    path: '/official-doc/draft',
    auth: true,
    exact: true,
    component: loadable(() => import('@/pages/personal-center/draft'))
  },
  // 公文首页路由放在后面，放在前面时，配置的可选参数会和'/official-doc/create'路由冲突
  {
    path: '/official-doc/:menuType?',
    auth: true,
    exact: true,
    component: loadable(() => import('@/pages/official-doc/index'))
  }
];